package com.cskaoyan.market.controller;

import com.cskaoyan.market.service.WxHomeService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName WxHomeController
 * @Description: TODO
 * @Author 远志 zhangsong@cskaoyan.onaliyun.com
 * @Date 2023/4/1 9:54
 * @Version V1.0
 **/
@RestController
@RequestMapping("wx/home")
public class WxHomeController {

    @Autowired
    WxHomeService wxHomeService;

    /**
     * 该方法需要banner(ad广告)、channel(category分类)、couponList（优惠券）
     * @return
     */
    @GetMapping("index")
    public Object index(){
        Map<String, Object> result = wxHomeService.index();
        return ResponseUtil.ok(result);
    }
}
